<%--
  Created by IntelliJ IDEA.
  User: zx
  Date: 2023/4/1
  Time: 13:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Book Management</title>
</head>
<body>
<center>
    <h1 style="color: darkorchid">欢迎来到欣欣书城</h1>
        <table border="1">
            <c:if test="${sessionScope.book[0] eq nill}">
                No records
            </c:if>
            <c:if test="${sessionScope.book[0] ne null}">
                <tr>
                    <th>图书编号</th>
                    <th>图书名称</th>
                    <th>出版社</th>
                    <th>图书作者</th>
                    <th>出版时间</th>
                    <th>图书价格</th>
                    <th>图书封面</th>
                </tr>
            </c:if>
            <c:forEach var="book" items="${sessionScope.book}">
                <tr>
                    <td>${book.id}</td>
                    <td>${book.title}</td>
                    <td>${book.publisher}</td>
                    <td>${book.author}</td>
                    <td>${book.publicationTime}</td>
                    <td>${book.price}</td>
                    <td>${book.cover}</td>
                </tr>
            </c:forEach>
        </table>
    <p><a href="/user/signOut">退出</a></p>
</center>
</body>
</html>
